<?php

namespace App\Sys\Models;


use App\Models\BaseModel;



class SysAppModel extends BaseModel
{
    protected $table = 'sys_app';
    const APP_CODE_ORGANIZER_CENTER = 'ORGANIZER_CENTER';
    const APP_CODE_EXHIBITOR_CENTER = 'EXHIBITOR_CENTER';
    const APP_CODE_MINIPROG_CENTER = 'MINIPROG_CENTER';
    const APP_CODE_MINIPROG_FRONT = 'MINIPROG_FRONT';

    public function getAppIdByCode($code)
    {
        $data = $this->db()
                ->where([
                    'code' => $code,
                    'status' => 0
                ])->first();
        return (array)$data;
    }
}
